import React,{ Component } from 'react';

import './FollowCard.scss';
import MpUrl from '@/route/getparam';

export default class FollowCard extends Component{
	constructor (props) {
		super(props)
		this.state = {
			nowType: 1,
      employee_id: ''
		}
	}
  componentDidMount () {
    let getUrl = new MpUrl()
    this.setState({
      employee_id: getUrl.get('employee_id')
    })
  }
  render() {
    return (
      <a href={!this.props.detail.wx_nickname ? '#' : `./customer?account_user_id=${this.props.detail.account_user_id}&employee_id=${this.state.employee_id}`}>
        <div className="follow-time">
          {this.props.detail.create_at}
        </div>
        <div className='follow-card'>
          <div className="follow-left--group">
            <span>{this.props.detail.content}</span>
            <div className={!this.props.detail.wx_nickname ? 'display-none' : ''}><div className='kehu'>客户：</div>{this.props.detail.wx_nickname}</div>
          </div>
          <div className="follow-right--group">
            <img src={this.props.detail.employee_img} alt='略略略' />
          </div>
        </div>
      </a>
    )
  }
}